﻿cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.6.2\\5.6\\msvc2013")
Project(qtUi)
message(STATUS ${PROJECT_NAME})
message(STATUS ${PROJECT_SOURCE_DIR})
message(STATUS ${PROJECT_BINARY_DIR})
set(CMAKE_INCLUDE_CURRENT_DIR ON)

include_directories(E:\\MyProjects\\librarys\\wxWidgets3.0\\include
E:\\MyProjects\\librarys\\wxWidgets3.0\\lib\\x86\\mswud  
# E:\\MyProjects\\librarys\\wxWidgets3.0\\include\\msvc
E:\\MyProjects\\librarys\\boost1.55.0
E:\\MyProjects\\librarys\\SDK\\include
E:\\MyProjects\\librarys\\opencv\\build\\include
E:\\MyProjects\\librarys\\OpenGL\\GLTools\\
E:\\MyProjects\\librarys\\ffmepg\\include
./LibCommon
)

link_directories(E:\\MyProjects\\librarys\\wxWidgets3.0\\lib\\x86
E:\\MyProjects\\librarys\\boost1.55.0\\bin\\vc12_x86\\lib
E:\\MyProjects\\librarys\\opencv\\build\\x86\\vc12\\lib
E:\\MyProjects\\librarys\\OpenGL\\GLTools\\lib\\x86
E:\\MyProjects\\librarys\\ffmepg\\x86\\lib
E:\\MyProjects\\librarys\\SDK\\lib\\x86D
${CMAKE_SOURCE_DIR}/Win32/Debug
)

set(ExtraLib ${ExtraLib}
"gltoolsud_v120.lib"
"opencv_core248d.lib"
"opencv_highgui248d.lib"
"opencv_imgproc248d.lib"

"comctl32.lib"
"rpcrt4.lib"
"wxbase30ud.lib"
"wxbase30ud_net.lib"
"wxbase30ud_xml.lib"
"wxexpatd.lib"
"wxjpegd.lib"
"wxmsw30ud_adv.lib"
"wxmsw30ud_aui.lib"
"wxmsw30ud_core.lib"
"wxmsw30ud_gl.lib"
"wxmsw30ud_html.lib"
"wxmsw30ud_media.lib"
"wxmsw30ud_propgrid.lib"
"wxmsw30ud_qa.lib"
"wxmsw30ud_ribbon.lib"
"wxmsw30ud_richtext.lib"
"wxmsw30ud_stc.lib"
"wxmsw30ud_webview.lib"
"wxmsw30ud_xrc.lib"
"wxpngd.lib"
"wxregexud.lib"
"wxscintillad.lib"
"wxtiffd.lib"
"wxzlibd.lib"
)

add_definitions(-D_CRT_SECURE_NO_WARNINGS -DUNICODE -D_UNICODE)
LINK_LIBRARIES(${ExtraLib})

FIND_PACKAGE(Qt5 REQUIRED
Core
Widgets
Opengl
Concurrent
)

# SET(${PROJECT_NAME}_SOURCES main.cpp mainwindow.cpp)
## 变量嵌套
aux_source_directory(. ${PROJECT_NAME}_SOURCES)
# tipDlgs.h 
SET(${PROJECT_NAME}_HEADERS customstatusbar.h mysplitter.h qtlogger.h systemSetDlg.h recordsetdlg.h threadhandle.h 
customlistwidgets.h EagleMainFrame.h mychndlgbtn.h qdisplaywidget.h statisticsanalyze.h common.h)
SET(${PROJECT_NAME}_UIS basePlayWnd.ui camControl.ui checkSetDlg.ui devNamSet.ui evfsCfgDlg.ui hexViewDlg.ui reNamDlg.ui snapShotDlg.ui 
batchExport.ui ccdRecordSetFM.ui commSetWidget.ui diagramDlg.ui exportStatDlg.ui pwdDlg.ui simuCtrlInfoWgt.ui 
softInfoDlg.ui bitSetDlg.ui ccdRecordSetTM.ui crossWireDlg.ui EagleMainFrame.ui extraParmsDlg.ui recordsetdlg.ui 
simuPlayDlg.ui systemSetDlg.ui)
SET(${PROJECT_NAME}_QRCS ./EagleClusterLinux.qrc)
QT5_WRAP_CPP(${PROJECT_NAME}_HEARDS_MOC ${${PROJECT_NAME}_HEADERS})
QT5_WRAP_UI(${PROJECT_NAME}_UIS_MOC ${${PROJECT_NAME}_UIS})
QT5_ADD_RESOURCES(${PROJECT_NAME}_QRCS_MOC ${${PROJECT_NAME}_QRCS})
SET(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEARDS_MOC} 
${${PROJECT_NAME}_UIS_MOC} EagleClusterLinux.rc ${${PROJECT_NAME}_QRCS_MOC})

FOREACH(SRC ${${PROJECT_NAME}_SOURCES})
MESSAGE(STATUS "SrcFile:" ${SRC})
ENDFOREACH(SRC)
# link_libraries(Qt5::Widgets Qt5::Core)
add_subdirectory(camerasCtrl)

# set(RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/Win32/Debug/")
# set(RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/Win32/Release/")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/Win32/Debug")
ADD_EXECUTABLE(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
target_link_libraries(${PROJECT_NAME} CamerasCtrl)
QT5_USE_MODULES(${PROJECT_NAME} Widgets Core Gui Concurrent)
SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/ignore:4099")
# target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core)  